package com.example.server2.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @author zhangW
 * @create 2024-12-10-9:15
 */
@Data
@TableName(value = "sys_user")
public class SysUser {
    //用户名
    @TableField(value = "user_name")
    private String userName;
    //密码
    @TableField(value = "pass_word")
    private String passWord;
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    protected Long id;

    /**
     * 数据创建者
     */
    @TableField(value = "creater", fill = FieldFill.INSERT)
    protected Long creater;

    /**
     * 数据创建时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Date createDate;

    /**
     * 数据修改者
     */
    @TableField(value = "updater", fill = FieldFill.INSERT_UPDATE)
    protected Long updater;

    /**
     * 数据最后更新时间
     */
    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Date updateDate;
}
